package com.ruoyi.datastatistics.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 公摊报表对象 t_public_share_report
 *
 * @author zt
 * @date 2025-05-27
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
public class PublicShareReportBo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @TableId(value="id",type = IdType.AUTO)
    private Long id;

    /** 租户号 */
     private String tenantId;

    /** 公摊主键 */
     private String publicShareId;

    /** 公摊名称 */
    @Excel(name = "公摊名称", sort = 2)
    private String publicShareName;

    /** 能耗分类 */
     private Long energyType;

    /** 公摊用量 */
    @Excel(name = "公摊用量", width = 30, sort = 12)
    private BigDecimal publicShareAmount;

    /** 公摊费用 */
     private BigDecimal publicShareCost;

    /** 公摊单价 */
     private BigDecimal price;

    /** 报表日期 */
    @Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd",sort = 5)
    private String reportDate;

    /** 报表类型1-日，2-月，3-年 */
     private Long reportType;

    /** 创建人 */
     private String createdBy;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date createdTime;

    /** 更新人 */
     private String updatedBy;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
     private Date updatedTime;

    @TableField(exist = false)
    @Excel(name = "用户名称", width = 30, sort = 4)
    private String userName;

    @TableField(exist = false)
    @Excel(name = "所属区域", width = 30, sort = 1)
    private String areaName;

    @TableField(exist = false)
    private String areaId;

    @TableField(exist = false)
    @Excel(name = "用户编号", width = 30, sort = 3)
    private String userId;

    @TableField(exist = false)
    private String sheetsCode;

    @TableField(exist = false)
    @Excel(name = "设备编号", width = 30, sort = 7)
    private String terminalId;

    @TableField(exist = false)
    @Excel(name = "设备名称", width = 30, sort = 8)
    private String installAddress;

    @TableField(exist = false)
    @Excel(name = "起始读数", width = 30, sort = 9)
    private String startReading;

    @TableField(exist = false)
    @Excel(name = "结束读数", width = 30, sort = 10)
    private String endReading;

    @TableField(exist = false)
    @Excel(name = "系数", width = 30, sort = 11)
    private String publicShareCoefficient;

    @TableField(exist = false)
    @Excel(name = "类型", type = Excel.Type.ALL, sort = 6, dictType = "public_share_type", dictTypeOnlyForExport = true)
    private String publicShareType;






    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("tenantId", getTenantId())
            .append("publicShareId", getPublicShareId())
            .append("publicShareName", getPublicShareName())
            .append("energyType", getEnergyType())
            .append("publicShareAmount", getPublicShareAmount())
            .append("publicShareCost", getPublicShareCost())
            .append("price", getPrice())
            .append("reportDate", getReportDate())
            .append("reportType", getReportType())
            .append("createdBy", getCreatedBy())
            .append("createdTime", getCreatedTime())
            .append("updatedBy", getUpdatedBy())
            .append("updatedTime", getUpdatedTime())
            .toString();
    }
}
